#include <stdlib.h>
#include <stdio.h>
#include <pwd.h>
static void func(int signo)
{
	struct passwd *rootptr;
	if( ( rootptr = getpwnam( "root" ) ) == NULL )
	{
    	err_sys( "getpwnam error" );
	}
	signal(SIGALRM,func);
	alarm(1);
}
int main(int argc, char** argv)
{
	signal(SIGALRM,func);
	alarm(1);
	for(;;)
	{
    	if( ( ptr = getpwnam("sar") ) == NULL )
    	{
        	err_sys( "getpwnam error" );
    	}
	}
	return 0;
}
